FROM registry.openanolis.cn/openanolis/anolisos:23

LABEL \
        maintainer="OpenAnolis Cloud Native SIG" \
        org.opencontainers.image.title=wordpress \
        org.opencontainers.image.version=6.2.2

RUN set -eux; \
    yum -y update; \ 
    yum -y install anolis-epao-release; \
    yum -y install httpd php php-fpm php-mysqlnd; \
    yum -y install wordpress; \
    yum clean all

RUN set -eux; \
    mkdir -p /var/www/html; \
    cp -rf /usr/share/wordpress/* /var/www/html/; \
    chown -R apache:apache /var/www/html; \
    chmod -R 755 /var/www/html; \
    rm -rf /var/www/html/wp-config.php; \
    mkdir -p /run/php-fpm

VOLUME /var/www/html
   
COPY docker-entrypoint.sh /usr/local/bin/

EXPOSE 80

ENTRYPOINT ["docker-entrypoint.sh"]

